Conversation
Add read-only CLI command to query validator vesting status from on-chain view functions. Displays vesting period, start/end timestamps, generated rewards, claimable rewards, and claimable commissions. Queries: - vestedStakingPositions(addr) on HydraStaking - calculatePositionTotalReward(addr) on HydraStaking - unclaimedRewards(addr) on HydraStaking - distributedCommissions(addr) on HydraDelegation Closes #475 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…+ add unit tests - Remove dead WithReceiptTimeout (unused by Call-only command) - Rename calculatePositionTotalReward → calculatePositionTotalRewardFn (consistency) - Use Abi.Methods[] instead of Abi.GetMethod() (consistency with other sidechain cmds) - Add GeneratedRewards to inactive-position human output (validators without vesting can have rewards) - Add clarifying comment on distributedCommissions semantics - Extract getVestingStatus() from runCommand for testability - Add 15 unit tests covering formatTimestamp, formatWei, validateFlags, GetOutput, queryVestedStakingPositions, querySingleUint256, getVestingStatus tests OK / health OK Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contract stores duration in seconds (durationWeeks * 604800). Convert back to weeks before displaying so the output matches the label. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The commission field in vestedStakingPositions is always 0 for self-staked validators (only populated for delegated vesting). Remove it from the struct, display, and tests to avoid confusion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The unclaimedRewards contract function returns total minus claimed, not the matured/claimable portion. Rename to avoid implying rewards are immediately withdrawable (they're locked during active vesting). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
R-Santev
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hydragon vesting-statusCLI command that lets validators check their vesting position status on-chainDetails
Resolves https://github.com/Hydra-Chain/hydragon-issues/issues/475
On-chain queries
0x104)vestedStakingPositions(address)0x104)calculatePositionTotalReward(address)0x104)unclaimedRewards(address)0x107)distributedCommissions(address)Files changed
command/sidechain/vesting-status/params.go(new) — params struct, result struct, output formattingcommand/sidechain/vesting-status/vesting_status.go(new) — command definition, ABI encoding/decoding, contract callscommand/sidechain/vesting-status/params_test.go(new) — unit tests for formatTimestamp, formatWei, validateFlags, GetOutputcommand/sidechain/vesting-status/vesting_status_test.go(new) — mock-based unit tests for queryVestedStakingPositions, querySingleUint256, getVestingStatuscommand/polybft/polybft_command.go(modified) — register the new subcommandUsage
Example output (no active vesting)
🤖 Generated with Claude Code